package com.camp.android.trip.n.track.menu;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ListView;

import com.camp.android.trip.n.track.R;

public class MenuUpcomingFragment extends ListFragment {

	private UpcomingListAdapter adapter = null;
	
    public MenuUpcomingFragment() {
    }

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        Log.i("Tag","Created upcoming fragment");
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
    	
    	View rootView = inflater.inflate(R.layout.fragment_menu_upcoming, container, false);
        Log.i("tag","upcoming fragment view created");
        adapter = new UpcomingListAdapter(inflater,getActivity());
        
        return rootView;
    }
    
    @Override
    public void onActivityCreated(Bundle savedInstanceState) {
    	super.onActivityCreated(savedInstanceState); 
    	Log.i("TAG","ManuUpcomingFragment onActivityCreated");
    	setListAdapter(adapter);
    }
    
    @Override
    public void onListItemClick(ListView l, View v, int position, long id) {
    	Log.i("TAG","Clicked on pos "+position);
    }
	  
}


